import java.util.Random;
import java.util.Scanner;

public class HomeWorkDemo02 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
//        System.out.println("请输入一个三位数");// 153
//        int num = scanner.nextInt();
//        int b = num / 100;//1
//        int s = num % 100 / 10;//1
//        int g = num % 10;// 3
//        if (b * b * b + s * s * s + g * g * g == num) {
//            System.out.println("是水仙花数");
//        }


//        System.out.println("请输入百位");
//        int b = scanner.nextInt();//1
//        System.out.println("请输入十位");
//        int s = scanner.nextInt();//5
//        System.out.println("请输入个位");
//        int g = scanner.nextInt();//3
//
//        if (b * b * b + s * s * s + g * g * g == b * 100 + s * 10 + g) {
//            System.out.println("水仙花数");
//        }

        for (int i = 100; i < 1000; i++) {
            int b = i / 100;//1
            int s = i % 100 / 10;//1
            int g = i % 10;// 3
            if (b * b * b + s * s * s + g * g * g == i) {
                System.out.println("是水仙花数" + i);
            }
        }


    }
}
